package com.toogu.mazhangmen.ui.monitor;

import android.view.View;
import android.widget.AdapterView;

import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
import com.toogu.mazhangmen.bean.EquipmentsBean;
import com.toogu.mazhangmen.ui.view.Monitor;
import com.toogu.mazhangmen.ui.view.MonitorView;
import com.toogu.mazhangmen.ui.view.RadioGroupView;
import com.toogu.mazhangmen.ui.view.SearchView;
import com.toogu.mazhangmen.util.MonitorUtil;

import java.util.List;

public interface MonitorContract {
    interface IView {
        void onCreate();//创建Activity的界面

        void onResume();

        void onPause();

        void onDestory();

        void setViewDelegate(Delegate delegate);//设置回调

        void showDate(List<EquipmentsBean> equipmentsBeanList);

        void setTitle(String title);

        void showEquipment(EquipmentsBean equipmentsBean);

        interface Delegate {
            MonitorUtil setMonitorUtil(EquipmentsBean equipmentsBean, MonitorView monitorView);
            void getNewDate(String projectId);
            MonitorAdapter.OnChoiceChange getOnChoiceChange();
        }

    }

    interface IModel {
        void onCreate();

        void onResume();

        void onPause();

        void onDestory();//用于切断网络链接等等

        void setModelDelegate(Delegate delegate);//设置回调

        void getProjectList(String projectId);

        interface Delegate {
            void onDataChanged(List<EquipmentsBean> equipmentsBeanList);
            void onSetTitle(String title);
        }
    }

    interface IPresenter {
        void onCreate(IView view, IModel model);

        void onResume();

        void onPause();

        void onDestory();//在Activity中调用，实现view和model的onDestory
    }
}
